<body>
        <div id="longDesc">
            <h1 style="margin:12pt 0in 0pt">
                <span style="color:#2e74b5; font-family:Calibri Light; font-size:large">Introduction</span><span style="font-family:Times New Roman">
                    <br>
                </span>
            </h1>
            <p>
                <span style="font-family:Calibri; font-size:small">
                    The<strong> xNetworking</strong> module is a part of the Windows PowerShell Desired State Configuration (DSC) Resource Kit, which is a collection of DSC Resources produced by the PowerShell Team. This module
                    contains the <strong>xFirewall, xIPAddress</strong> and <strong>xDnsServerAddress</strong> resources. These DSC Resources allow configuration of a node&rsquo;s IP Address, DNS Server Address, and Firewall Rules.
                </span>
            </p>
            <p>
                <span style="font-family:Calibri; font-size:small">
                    <strong>All of the resources in the DSC Resource Kit are provided AS IS, and are not supported through any Microsoft standard support program or service. The &ldquo;x&rdquo; in xNetworking stands for experimental</strong>,
                    which means that these resources will be <strong>fix forward</strong> and monitored by the module owner(s).
                </span>
            </p>
            <p><span style="font-family:Calibri; font-size:small">Please leave comments, feature requests, and bug reports in the Q &amp; A tab for this module.</span></p>
            <p>
                <span style="font-family:Calibri; font-size:small">
                    If you would like to modify
                    <strong>xNetworking</strong> module, feel free. When modifying, please update the module name, resource friendly name, and MOF class name (instructions below). As specified in the license, you may copy or modify this resource as long as they are used on the
                    Windows Platform.
                </span>
            </p>
            <p>
                <span style="font-size:small">
                    <span style="font-family:Calibri">
                        For more information about Windows PowerShell Desired State Configuration, check out the blog posts on the
                    </span><a href="http://blogs.msdn.com/b/powershell/"><span style="color:#0000ff; font-family:Calibri">PowerShell Blog</span></a><span style="font-family:Calibri"> (</span><a href="http://blogs.msdn.com/b/powershell/archive/2013/11/01/configuration-in-a-devops-world-windows-powershell-desired-state-configuration.aspx"><span style="color:#0000ff; font-family:Calibri">this</span></a><span style="font-family:Calibri">
                        is a good starting point).&nbsp; There are also great community resources, such as
                    </span><a href="http://powershell.org/wp/tag/dsc/"><span style="color:#0000ff; font-family:Calibri">PowerShell.org</span></a><span style="font-family:Calibri">
                        , or
                    </span><a href="http://www.powershellmagazine.com/tag/dsc/"><span style="color:#0000ff; font-family:Calibri">PowerShell Magazine</span></a><span style="font-family:Calibri">
                        .&nbsp; For more information on the DSC Resource Kit, check out
                    </span><a href="http://go.microsoft.com/fwlink/?LinkID=389546"><span style="color:#0000ff; font-family:Calibri">this blog post</span></a><span style="font-family:Calibri">.</span>
                </span><span style="font-family:Times New Roman">
                    <br>
                </span>
            </p>
            <h1 style="margin:12pt 0in 0pt">
                <span style="color:#2e74b5; font-family:Calibri Light; font-size:large">Installation</span><span style="font-family:Times New Roman">
                    <br>
                </span>
            </h1>
            <p style="margin:0in 0in 8pt">
                <span style="font-size:small">
                    <span style="font-family:Calibri">
                        To install
                        <strong>xNetworking</strong> module
                    </span><span style="font-family:Times New Roman">
                        <br>
                    </span>
                </span>
            </p>
            <ul style="list-style-type:disc; direction:ltr">
                <li style="color:#000000; font-style:normal; font-weight:normal">
                    <p style="color:#000000; font-style:normal; font-weight:normal; margin-top:0in; margin-bottom:8pt">
                        <span style="font-size:small">Unzip the content under $env:ProgramFiles\WindowsPowerShell\Modules folder</span>
                    </p>
                </li>
            </ul>
            <p>
                <span style="font-size:small">
                    <span style="font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;">To confirm installation:</span><span style="font-family:Times New Roman">
                        <br>
                    </span>
                </span>
            </p>
            <ul style="list-style-type:disc; direction:ltr">
                <li style="color:#000000; font-style:normal; font-weight:normal">
                    <p style="color:#000000; font-style:normal; font-weight:normal; margin-top:0in; margin-bottom:8pt">
                        <span style="font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;; font-size:small">
                            Run <strong>Get-DSCResource</strong> to see that
                            <strong>xFirewall, xIPAddress</strong> and <strong>xDnsServerAddress</strong>&nbsp;are among the DSC Resources listed
                        </span><span style="font-family:Times New Roman">
                            <br>
                        </span>
                    </p>
                </li>
            </ul>
            <h1 style="margin:12pt 0in 0pt"><strong><span style="font-family:&quot;Calibri Light&quot;,&quot;sans-serif&quot;"><span style="color:#2e74b5; font-size:large">Requirements</span></span></strong></h1>
            <p style="margin:0in 0in 8pt">
                <span style="font-size:small">
                    <span style="font-family:Calibri">
                        This module requires the latest version of PowerShell (v4.0, which ships in Windows 8.1 or Windows Server 2012R2). To easily use PowerShell 4.0 on older operating
                        systems,
                    </span><a href="http://www.microsoft.com/en-us/download/details.aspx?id=40855"><span style="color:#0000ff; font-family:Calibri">install WMF 4.0</span></a><span style="font-family:Calibri">
                        .&nbsp; Please read the installation instructions that are
                        present on both the download page and the release notes for WMF 4.0.
                    </span>
                </span>
            </p>
            <p><strong><span style="font-family:&quot;Calibri Light&quot;,&quot;sans-serif&quot;"><span style="color:#2e74b5; font-size:large">Description</span></span></strong></p>
            <p>
                <span style="font-family:Calibri; font-size:small">
                    The <strong>xNetworking </strong>
                    module contains the <strong>xIPAddress, </strong>&nbsp;and&nbsp; DSC Resources.&nbsp; Instead of needing to know and remember the functionality and syntax for the IPAddress and DNS cmdlets, these DSC Resources allow you to easily configure and maintain your
                    networking settings by writing simple configurations.&nbsp; The <strong>
                        xFirewall
                    </strong>resource allows configuration of Firewall rules.
                </span><span style="font-family:Times New Roman">
                    <br>
                </span>
            </p>
            <h1 style="margin:12pt 0in 0pt"><span style="color:#2e74b5; font-family:Calibri Light; font-size:large">Details</span></h1>
            <p><span style="font-family:Calibri; font-size:small"><strong>xIPAddress</strong> resource has following properties:</span></p>
            <ul style="list-style-type:disc; direction:ltr">
                <li style="color:#000000; font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;; font-size:11pt; font-style:normal; font-weight:normal">
                    <span style="font-size:small">
                        <strong>IPAddress</strong>: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The desired IP Address
                    </span>
                </li>
                <li style="color:#000000; font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;; font-size:11pt; font-style:normal; font-weight:normal">
                    <span style="font-size:small">
                        <strong>InterfaceAlias</strong>: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Alias of the network interface for which IP Address is set
                    </span>
                </li>
                <li style="color:#000000; font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;; font-size:11pt; font-style:normal; font-weight:normal">
                    <span style="font-size:small">
                        <strong>DefaultGateway</strong>: Specifies the IP address of the default gateway for the host
                    </span>
                </li>
                <li style="color:#000000; font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;; font-size:11pt; font-style:normal; font-weight:normal">
                    <span style="font-size:small">
                        <strong>SubnetMask</strong>: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Local subnet size
                    </span>
                </li>
                <li style="color:#000000; font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;; font-size:11pt; font-style:normal; font-weight:normal">
                    <span style="font-size:small">
                        <strong>AddressFamily</strong>:&nbsp;&nbsp;&nbsp; IP address family - IPv4 or IPv6
                    </span>
                </li>
            </ul>
            <p><span style="font-family:Calibri; font-size:small"><strong>xDnsServerAddress</strong> resource has following properties:</span></p>
            <ul style="list-style-type:disc; direction:ltr">
                <li style="color:#000000; font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;; font-size:11pt; font-style:normal; font-weight:normal">
                    <span style="font-size:small">
                        <strong>Address</strong>: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The desired DNS Server addresses
                    </span>
                </li>
                <li style="color:#000000; font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;; font-size:11pt; font-style:normal; font-weight:normal">
                    <span style="font-size:small">
                        <strong>InterfaceAlias</strong>: &nbsp;&nbsp;Alias of the network interface for which DNS Server Address is set
                    </span>
                </li>
                <li style="color:#000000; font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;; font-size:11pt; font-style:normal; font-weight:normal">
                    <span style="font-size:small"><strong>AddressFamily</strong>:&nbsp; IP address family - IPv4 or IPv6</span>
                </li>
            </ul>
            <span style="font-family:Calibri; font-size:medium">
                <p><span style="font-size:small"><strong>xFirewall</strong> resource has following properties:</span></p>
                <ul style="list-style-type:disc; direction:ltr">
                    <li>
                        <span style="font-size:small">
                            <strong>Name</strong>: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Name of the Firewall Rule
                        </span>
                    </li>
                    <li>
                        <span style="font-size:small">
                            <strong>DisplayName</strong>: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Localized, user-facing name of the Firewall Rule being created
                        </span>
                    </li>
                    <li>
                        <span style="font-size:small">
                            <strong>DisplayGroup</strong>:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Name of the Firewall Group where we want to put the Firewall Rules
                        </span>
                    </li>
                    <li>
                        <span style="font-size:small">
                            <strong>Ensure</strong>: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Ensure the presence/absence of the resource
                        </span>
                    </li>
                    <li>
                        <span style="font-size:small">
                            <strong>Access</strong>:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Permit or Block the supplied configuration
                        </span>
                    </li>
                    <li>
                        <span style="font-size:small">
                            <strong>State</strong>: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Enable or disable the supplied configuration
                        </span>
                    </li>
                    <li>
                        <span style="font-size:small">
                            <span style="font-family:Calibri">&nbsp;</span><strong>Profile</strong>:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; Specifies one or more profiles to which the rule is assigned
                        </span>
                    </li>
                    <li>
                        <span style="font-size:small">
                            <strong>Direction</strong>: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Direction of the connection
                        </span>
                    </li>
                    <li>
                        <span style="font-size:small">
                            <strong>RemotePort</strong>: &nbsp; &nbsp;&nbsp;&nbsp;&nbsp; Specific Port used for filter. Specified by port number, range, or keyword
                        </span>
                    </li>
                    <li>
                        <span style="font-size:small">
                            <strong>LocalPort</strong>: &nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Local Port used for the filter
                        </span>
                    </li>
                    <li>
                        <span style="font-size:small">
                            <strong>Protocol</strong>:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Specific Protocol for filter. Specified by name, number, or range
                        </span>
                    </li>
                    <li>
                        <span style="font-size:small">
                            <strong>Description</strong>: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Documentation for the Rule
                        </span>
                    </li>
                    <li>
                        <span style="font-size:small">
                            <strong>ApplicationPath</strong>:&nbsp; Path and file name of the program for which the rule is applied
                        </span>
                    </li>
                    <li>
                        <span style="font-size:small">
                            <strong>Service</strong>: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Specifies the short name of a Windows service to which the firewall rule applies
                        </span>
                    </li>
                </ul>
            </span>
            <h1 style="margin:12pt 0in 0pt"><span style="color:#2e74b5; font-family:Calibri Light; font-size:large">Renaming Requirements</span></h1>
            <p><span style="color:#2e74b5; font-family:Calibri Light; font-size:small"><span lang="EN" style="line-height:107%; font-family:'Calibri','sans-serif'; color:#424242">When making changes to these resources, we suggest the following practice:</span></span></p>
            <ol style="list-style-type:decimal; direction:ltr">
                <li style="color:#000000; font-family:'Calibri','sans-serif'; font-style:normal; font-weight:normal">
                    <p style="color:#000000; font-family:'Calibri','sans-serif'; font-style:normal; font-weight:normal; margin-top:0in; margin-bottom:0pt">
                        <span lang="EN" style="font-size:small">
                            Update the following names by replacing MSFT with your company/community name and replacing the
                            <strong>&ldquo;x&rdquo;</strong> with <strong>&quot;c&quot;</strong> (short for &quot;Community&quot;) or another prefix of your choice:
                        </span>
                    </p>
                    <ul>
                        <li>
                            <span style="font-size:small">
                                <strong><span lang="EN">Module Name (ex: xNetworking</span></strong> becomes
                                <strong>cNetworking</strong>)
                            </span>
                        </li>
                    </ul>
                    <ul>
                        <li>
                            <span style="font-size:small">
                                <strong><span lang="EN">Resource Folder (ex: MSFT_xIPAddress</span></strong> becomes
                                <strong>Contoso_cIPAddress</strong>)
                            </span>
                        </li>
                    </ul>
                    <ul>
                        <li>
                            <span style="font-size:small">
                                <strong><span lang="EN">Resource Name (ex: MSFT_xIPAddress</span></strong> becomes
                                <strong>Contoso_cIPAddress</strong>)
                            </span>
                        </li>
                        <li>
                            <span style="font-size:small">
                                <strong><span lang="EN">Resource Friendly Name (ex: xIPAddress</span></strong> becomes
                                <strong>cIPAddress</strong>)
                            </span>
                        </li>
                        <li>
                            <span style="font-size:small">
                                <strong><span lang="EN">MOF class name (ex: MSFT_xIPAddress</span></strong> becomes
                                <strong>Contoso_cIPAddress</strong>)
                            </span>
                        </li>
                        <li>
                            <span style="font-size:small">
                                <strong><span lang="EN">Filename for the &lt;resource&gt;.schema.mof (ex: MSFT_xIPAddress</span></strong>.schema.mof becomes
                                <strong>Contoso_cIPAddress</strong>.schema.mof)
                            </span>
                        </li>
                    </ul>
                </li>
                <li style="color:#000000; font-family:'Calibri','sans-serif'; font-style:normal; font-weight:normal">
                    <p style="color:#000000; font-style:normal; font-weight:normal; margin-top:0in; margin-bottom:0pt">
                        <span lang="EN" style="font-size:small">Update module and metadata information in the module manifest</span>
                    </p>
                </li>
                <li style="color:#000000; font-family:'Calibri','sans-serif'; font-style:normal; font-weight:normal">
                    <p style="color:#000000; font-style:normal; font-weight:normal; margin-top:0in; margin-bottom:0pt">
                        <span lang="EN" style="font-size:small">Update any configuration that use these resources</span>
                    </p>
                </li>
            </ol>
            <p>
                <span style="font-size:small">
                    <em>
                        <span lang="EN" style="line-height:107%; font-family:'Calibri','sans-serif'; color:#424242">
                            We reserve resource and module names without prefixes (&quot;x&quot; or &quot;c&quot;) for future use (e.g. &quot;<span style="font-size:small"><span lang="EN">MSFT_xIPAddress</span></span>&quot;
                            or &quot;<span style="font-size:small"><span lang="EN">IPAddress</span></span>&quot;).&nbsp; If the next version of Windows Server ships with a &quot;<span style="font-size:small"><em><span lang="EN" style="line-height:107%; font-family:'Calibri','sans-serif'; color:#424242"><span style="font-size:small"><span lang="EN">IPAddress</span></span></span></em></span>&quot;
                            resource, we don't want to break any configurations that use any community modifications.&nbsp; Please keep a prefix such as &quot;c&quot; on all community modifications.
                        </span>
                    </em>
                </span>
            </p>
            <h1 style="margin:12pt 0in 0pt">
                <strong>
                    <span style="font-family:&quot;Calibri Light&quot;,&quot;sans-serif&quot;">
                        <span style="color:#2e74b5; font-size:large">
                            Example: Set IP Address on Ethernet NIC
                        </span>
                    </span>
                </strong>
            </h1>
            <p style="margin:0in 0in 0pt"><span style="font-family:Calibri; font-size:small">This configuration will set IP Address with some typical values for network interface alias = Ethernet.</span></p>
            <br>
            <div class="scriptcode">
                <div class="pluginEditHolder" plugincommand="mceScriptCode">
                    <div class="title"><span>PowerShell</span></div>
                    <div class="pluginLinkHolder"><span class="pluginEditHolderLink">Edit</span>|<span class="pluginRemoveHolderLink">Remove</span></div>
                    <span class="hidden">powershell</span>
<pre class="hidden">configuration Sample_xIPAddress_FixedValue
{
    param
    (
        [string[]]$NodeName = 'localhost'
    )
    Import-DscResource -Module xNetworking
    Node $NodeName
    {
        xIPAddress NewIPAddress
        {
            IPAddress      = &quot;2001:4898:200:7:6c71:a102:ebd8:f482&quot;
            InterfaceAlias = &quot;Ethernet&quot;
            SubnetMask     = 24
            AddressFamily  = &quot;IPV6&quot;
        }
    }
}</pre>
                    <div class="preview">
<pre class="powershell">configuration&nbsp;Sample_xIPAddress_FixedValue&nbsp;
{&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;<span class="powerShell__keyword">param</span>&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;(&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[string[]]<span class="powerShell__variable">$NodeName</span>&nbsp;=&nbsp;<span class="powerShell__string">'localhost'</span>&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;)&nbsp;
&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;Import<span class="powerShell__operator">-</span>DscResource&nbsp;<span class="powerShell__operator">-</span>Module&nbsp;xNetworking&nbsp;
&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;Node&nbsp;<span class="powerShell__variable">$NodeName</span>&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;{&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;xIPAddress&nbsp;NewIPAddress&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;IPAddress&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;<span class="powerShell__string">&quot;2001:4898:200:7:6c71:a102:ebd8:f482&quot;</span>&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;InterfaceAlias&nbsp;=&nbsp;<span class="powerShell__string">&quot;Ethernet&quot;</span>&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;SubnetMask&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;24&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;AddressFamily&nbsp;&nbsp;=&nbsp;<span class="powerShell__string">&quot;IPV6&quot;</span>&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;
}</pre>
                    </div>
                </div>
            </div>
            <div class="endscriptcode">&nbsp;</div>
            <h1 style="margin:12pt 0in 0pt"><strong><span style="font-family:&quot;Calibri Light&quot;,&quot;sans-serif&quot;"><span style="color:#2e74b5; font-size:large">Example: Set IP Address with parameterized valuesspan&gt;</span></span></strong></h1>
            <p style="margin:0in 0in 0pt"><span style="font-family:Calibri; font-size:small">This configuration will set IP Address along with default gateway on a network interface that is identified by its alias.</span></p>
            <br>
            <div class="scriptcode">
                <div class="pluginEditHolder" plugincommand="mceScriptCode">
                    <div class="title"><span>PowerShell</span></div>
                    <div class="pluginLinkHolder"><span class="pluginEditHolderLink">Edit</span>|<span class="pluginRemoveHolderLink">Remove</span></div>
                    <span class="hidden">powershell</span>
<pre class="hidden">configuration Sample_xIPAddress_Parameterized
{
    param
    (
        [string[]]$NodeName = 'localhost',
        [Parameter(Mandatory)]
        [string]$IPAddress,
        [Parameter(Mandatory)]
        [string]$InterfaceAlias,
        [Parameter(Mandatory)]
        [string]$DefaultGateway,
        [int]$SubnetMask = 16,
        [ValidateSet(&quot;IPv4&quot;,&quot;IPv6&quot;)]
        [string]$AddressFamily = 'IPv4'
    )
    Import-DscResource -Module xNetworking
    Node $NodeName
    {
        xIPAddress NewIPAddress
        {
            IPAddress      = $IPAddress
            InterfaceAlias = $InterfaceAlias
            DefaultGateway = $DefaultGateway
            SubnetMask     = $SubnetMask
            AddressFamily  = $AddressFamily
        }
    }
}</pre>
                    <div class="preview">
<pre class="powershell">configuration&nbsp;Sample_xIPAddress_Parameterized&nbsp;
{&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;<span class="powerShell__keyword">param</span>&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;(&nbsp;
&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[string[]]<span class="powerShell__variable">$NodeName</span>&nbsp;=&nbsp;<span class="powerShell__string">'localhost'</span>,&nbsp;
&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Parameter(Mandatory)]&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[string]<span class="powerShell__variable">$IPAddress</span>,&nbsp;
&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Parameter(Mandatory)]&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[string]<span class="powerShell__variable">$InterfaceAlias</span>,&nbsp;
&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Parameter(Mandatory)]&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[string]<span class="powerShell__variable">$DefaultGateway</span>,&nbsp;
&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[int]<span class="powerShell__variable">$SubnetMask</span>&nbsp;=&nbsp;16,&nbsp;
&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[ValidateSet(<span class="powerShell__string">&quot;IPv4&quot;</span>,<span class="powerShell__string">&quot;IPv6&quot;</span>)]&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[string]<span class="powerShell__variable">$AddressFamily</span>&nbsp;=&nbsp;<span class="powerShell__string">'IPv4'</span>&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;)&nbsp;
&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;Import<span class="powerShell__operator">-</span>DscResource&nbsp;<span class="powerShell__operator">-</span>Module&nbsp;xNetworking&nbsp;
&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;Node&nbsp;<span class="powerShell__variable">$NodeName</span>&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;{&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;xIPAddress&nbsp;NewIPAddress&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;IPAddress&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;<span class="powerShell__variable">$IPAddress</span>&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;InterfaceAlias&nbsp;=&nbsp;<span class="powerShell__variable">$InterfaceAlias</span>&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;DefaultGateway&nbsp;=&nbsp;<span class="powerShell__variable">$DefaultGateway</span>&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;SubnetMask&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;<span class="powerShell__variable">$SubnetMask</span>&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;AddressFamily&nbsp;&nbsp;=&nbsp;<span class="powerShell__variable">$AddressFamily</span>&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;
}</pre>
                    </div>
                </div>
            </div>
            <div class="endscriptcode">&nbsp;</div>
            <h1 style="margin:12pt 0in 0pt"><span style="color:#2e74b5; font-family:Calibri Light; font-size:large">Example: Set DNS Server Address</span></h1>
            <p style="margin:0in 0in 0pt"><span style="font-family:Calibri; font-size:small">This configuration will set DNS Server Address on a network interface that is identified by its alias.&nbsp;</span></p>
            <br>
            <div class="scriptcode">
                <div class="pluginEditHolder" plugincommand="mceScriptCode">
                    <div class="title"><span>PowerShell</span></div>
                    <div class="pluginLinkHolder"><span class="pluginEditHolderLink">Edit</span>|<span class="pluginRemoveHolderLink">Remove</span></div>
                    <span class="hidden">powershell</span>
<pre class="hidden">configuration Sample_xDnsServerAddress
{
    param
    (
        [string[]]$NodeName = 'localhost',
        [Parameter(Mandatory)]
        [string]$DnsServerAddress,
        [Parameter(Mandatory)]
        [string]$InterfaceAlias,
        [ValidateSet(&quot;IPv4&quot;,&quot;IPv6&quot;)]
        [string]$AddressFamily = 'IPv4'
    )
    Import-DscResource -Module xNetworking
    Node $NodeName
    {
        xDnsServerAddress DnsServerAddress
        {
            Address        = $DnsServerAddress
            InterfaceAlias = $InterfaceAlias
            AddressFamily  = $AddressFamily
        }
    }
}</pre>
                    <div class="preview">
<pre class="powershell">configuration&nbsp;Sample_xDnsServerAddress&nbsp;
{&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;<span class="powerShell__keyword">param</span>&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;(&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[string[]]<span class="powerShell__variable">$NodeName</span>&nbsp;=&nbsp;<span class="powerShell__string">'localhost'</span>,&nbsp;
&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Parameter(Mandatory)]&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[string]<span class="powerShell__variable">$DnsServerAddress</span>,&nbsp;
&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Parameter(Mandatory)]&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[string]<span class="powerShell__variable">$InterfaceAlias</span>,&nbsp;
&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[ValidateSet(<span class="powerShell__string">&quot;IPv4&quot;</span>,<span class="powerShell__string">&quot;IPv6&quot;</span>)]&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[string]<span class="powerShell__variable">$AddressFamily</span>&nbsp;=&nbsp;<span class="powerShell__string">'IPv4'</span>&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;)&nbsp;
&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;Import<span class="powerShell__operator">-</span>DscResource&nbsp;<span class="powerShell__operator">-</span>Module&nbsp;xNetworking&nbsp;
&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;Node&nbsp;<span class="powerShell__variable">$NodeName</span>&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;{&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;xDnsServerAddress&nbsp;DnsServerAddress&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Address&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;<span class="powerShell__variable">$DnsServerAddress</span>&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;InterfaceAlias&nbsp;=&nbsp;<span class="powerShell__variable">$InterfaceAlias</span>&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;AddressFamily&nbsp;&nbsp;=&nbsp;<span class="powerShell__variable">$AddressFamily</span>&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;
}</pre>
                    </div>
                </div>
            </div>
            <span style="font-family:Calibri; font-size:medium">
                <h1 style="margin-bottom:0pt; font-family:Calibri Light; color:#2e74b5; font-size:large">
                    Example: Adding a Firewall Rule
                </h1>
                <div id="longDesc">This configuration will ensure that a firewall rule is present.</div>
                <div>
                    <div class="scriptcode">
                        <div class="pluginEditHolder">
                            <div class="title"><span>PowerShell</span></div>
                            <div class="pluginLinkHolder"><span class="pluginEditHolderLink">Edit</span>|<span class="pluginRemoveHolderLink">Remove</span></div>
                            <div class="preview">
<pre class="powershell"><span class="powerShell__com">#&nbsp;DSC&nbsp;configuration&nbsp;for&nbsp;Firewall</span>&nbsp;
&nbsp;
configuration&nbsp;Add_FirewallRule&nbsp;
{&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;<span class="powerShell__keyword">param</span>&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;(&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[string[]]<span class="powerShell__variable">$NodeName</span>&nbsp;=&nbsp;<span class="powerShell__string">'localhost'</span>&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;)&nbsp;
&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;Import<span class="powerShell__operator">-</span>DSCResource&nbsp;<span class="powerShell__operator">-</span>ModuleName&nbsp;xNetworking&nbsp;
&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;Node&nbsp;<span class="powerShell__variable">$NodeName</span>&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;{&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;xFirewall&nbsp;Firewall&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;<span class="powerShell__string">&quot;MyAppFirewallRule&quot;</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ApplicationPath&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;<span class="powerShell__string">&quot;c:\windows\system32\MyApp.exe&quot;</span>&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Access&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;<span class="powerShell__string">&quot;Allow&quot;</span>&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;
&nbsp;}</pre>
                            </div>
                        </div>
                    </div>
                </div>
                <h1 style="margin-bottom:0pt; font-family:Calibri Light; color:#2e74b5; font-size:large">
                    Example: Add a Firewall Rule to an Existing Group
                </h1>
                <div id="longDesc">This configuration ensures that two Firewall rules are present on the target node, both within the same group.</div>
                <div>
                    <br>
                    <div class="scriptcode">
                        <div class="pluginEditHolder">
                            <div class="title"><span>PowerShell</span></div>
                            <div class="pluginLinkHolder"><span class="pluginEditHolderLink">Edit</span>|<span class="pluginRemoveHolderLink">Remove</span></div>
                            <div class="preview">
<pre class="powershell"><span class="powerShell__com">#&nbsp;DSC&nbsp;configuration&nbsp;for&nbsp;Firewall</span>&nbsp;
<span class="powerShell__com">#&nbsp;</span>&nbsp;
&nbsp;
configuration&nbsp;Add_FirewallRuleToExistingGroup&nbsp;
{&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;<span class="powerShell__keyword">param</span>&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;(&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[string[]]<span class="powerShell__variable">$NodeName</span>&nbsp;=&nbsp;<span class="powerShell__string">'localhost'</span>&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;)&nbsp;
&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;Import<span class="powerShell__operator">-</span>DSCResource&nbsp;<span class="powerShell__operator">-</span>ModuleName&nbsp;xNetworking&nbsp;
&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;Node&nbsp;<span class="powerShell__variable">$NodeName</span>&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;{&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;xFirewall&nbsp;Firewall&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;<span class="powerShell__string">&quot;MyFirewallRule&quot;</span>&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;DisplayName&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;<span class="powerShell__string">&quot;My&nbsp;Firewall&nbsp;Rule&quot;</span>&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;DisplayGroup&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;<span class="powerShell__string">&quot;My&nbsp;Firewall&nbsp;Rule&nbsp;Group&quot;</span>&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Access&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;<span class="powerShell__string">&quot;Allow&quot;</span>&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;
&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;xFirewall&nbsp;Firewall1&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;<span class="powerShell__string">&quot;MyFirewallRule1&quot;</span>&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;DisplayName&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;<span class="powerShell__string">&quot;My&nbsp;Firewall&nbsp;Rule&quot;</span>&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;DisplayGroup&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;<span class="powerShell__string">&quot;My&nbsp;Firewall&nbsp;Rule&nbsp;Group&quot;</span>&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Ensure&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;<span class="powerShell__string">&quot;Present&quot;</span>&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Access&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;<span class="powerShell__string">&quot;Allow&quot;</span>&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;State&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;<span class="powerShell__string">&quot;Enabled&quot;</span>&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Profile&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;(<span class="powerShell__string">&quot;Domain&quot;</span>,&nbsp;<span class="powerShell__string">&quot;Private&quot;</span>)&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;
&nbsp;}</pre>
                            </div>
                        </div>
                    </div>
                    <div class="endscriptcode">&nbsp;</div>
                </div>
                <h1 style="color:#2e74b5; font-family:Calibri Light; font-size:large">Example: Disable Access to an Application</h1>
                <div id="longDesc">This example ensures that notebad.exe is blocked.</div>
                <div>
                    <div class="scriptcode">
                        <div class="pluginEditHolder">
                            <div class="title"><span>PowerShell</span></div>
                            <div class="pluginLinkHolder"><span class="pluginEditHolderLink">Edit</span>|<span class="pluginRemoveHolderLink">Remove</span></div>
                            <div class="preview">
<pre class="powershell"><span class="powerShell__com">#&nbsp;DSC&nbsp;configuration&nbsp;for&nbsp;Firewall</span>&nbsp;
<span class="powerShell__com">#&nbsp;</span>&nbsp;
&nbsp;
configuration&nbsp;Disable_AccessToApplication&nbsp;
{&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;<span class="powerShell__keyword">param</span>&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;(&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[string[]]<span class="powerShell__variable">$NodeName</span>&nbsp;=&nbsp;<span class="powerShell__string">'localhost'</span>&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;)&nbsp;
&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;Import<span class="powerShell__operator">-</span>DSCResource&nbsp;<span class="powerShell__operator">-</span>ModuleName&nbsp;xNetworking&nbsp;
&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;Node&nbsp;<span class="powerShell__variable">$NodeName</span>&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;{&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;xFirewall&nbsp;Firewall&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;<span class="powerShell__string">&quot;NotePadFirewallRule&quot;</span>&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;DisplayName&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;<span class="powerShell__string">&quot;Firewall&nbsp;Rule&nbsp;for&nbsp;Notepad.exe&quot;</span>&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;DisplayGroup&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;<span class="powerShell__string">&quot;NotePad&nbsp;Firewall&nbsp;Rule&nbsp;Group&quot;</span>&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Ensure&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;<span class="powerShell__string">&quot;Present&quot;</span>&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Access&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;<span class="powerShell__string">&quot;Block&quot;</span>&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Description&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;<span class="powerShell__string">&quot;Firewall&nbsp;Rule&nbsp;for&nbsp;Notepad.exe&quot;</span>&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ApplicationPath&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;<span class="powerShell__string">&quot;c:\windows\system32\notepad.exe&quot;</span>&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;
&nbsp;}</pre>
                            </div>
                        </div>
                    </div>
                    <div class="endscriptcode">&nbsp;</div>
                </div>
                <h1 style="margin-bottom:0pt; color:#2e74b5; font-family:Calibri Light; font-size:large">
                    Example: Disable Access with additional parameters
                </h1>
                <div id="longDesc">This example will disable notepad.exe's outbound access.</div>
                <div>
                    <div class="scriptcode">
                        <div class="pluginEditHolder">
                            <div class="title"><span>PowerShell</span></div>
                            <div class="pluginLinkHolder"><span class="pluginEditHolderLink">Edit</span>|<span class="pluginRemoveHolderLink">Remove</span></div>
                            <div class="preview">
<pre class="powershell"><span class="powerShell__com">#&nbsp;DSC&nbsp;configuration&nbsp;for&nbsp;Firewall</span>&nbsp;
&nbsp;
configuration&nbsp;Sample_xFirewall&nbsp;
{&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;<span class="powerShell__keyword">param</span>&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;(&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[string[]]<span class="powerShell__variable">$NodeName</span>&nbsp;=&nbsp;<span class="powerShell__string">'localhost'</span>&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;)&nbsp;
&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;Import<span class="powerShell__operator">-</span>DSCResource&nbsp;<span class="powerShell__operator">-</span>ModuleName&nbsp;xNetworking&nbsp;
&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;Node&nbsp;<span class="powerShell__variable">$NodeName</span>&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;{&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;xFirewall&nbsp;Firewall&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;<span class="powerShell__string">&quot;NotePadFirewallRule&quot;</span>&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;DisplayName&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;<span class="powerShell__string">&quot;Firewall&nbsp;Rule&nbsp;for&nbsp;Notepad.exe&quot;</span>&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;DisplayGroup&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;<span class="powerShell__string">&quot;NotePad&nbsp;Firewall&nbsp;Rule&nbsp;Group&quot;</span>&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Ensure&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;<span class="powerShell__string">&quot;Present&quot;</span>&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Access&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;<span class="powerShell__string">&quot;Allow&quot;</span>&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;State&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;<span class="powerShell__string">&quot;Enabled&quot;</span>&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Profile&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;(<span class="powerShell__string">&quot;Domain&quot;</span>,&nbsp;<span class="powerShell__string">&quot;Private&quot;</span>)&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Direction&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;<span class="powerShell__string">&quot;OutBound&quot;</span>&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;RemotePort&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;(<span class="powerShell__string">&quot;8080&quot;</span>,&nbsp;<span class="powerShell__string">&quot;8081&quot;</span>)&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;LocalPort&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;(<span class="powerShell__string">&quot;9080&quot;</span>,&nbsp;<span class="powerShell__string">&quot;9081&quot;</span>)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Protocol&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;<span class="powerShell__string">&quot;TCP&quot;</span>&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Description&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;<span class="powerShell__string">&quot;Firewall&nbsp;Rule&nbsp;for&nbsp;Notepad.exe&quot;</span>&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ApplicationPath&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;<span class="powerShell__string">&quot;c:\windows\system32\notepad.exe&quot;</span>&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Service&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;&nbsp;<span class="powerShell__string">&quot;WinRM&quot;</span>&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;
&nbsp;}&nbsp;
&nbsp;
Sample_xFirewall&nbsp;
Start<span class="powerShell__operator">-</span>DscConfiguration&nbsp;<span class="powerShell__operator">-</span>Path&nbsp;Sample_xFirewall&nbsp;<span class="powerShell__operator">-</span>Wait&nbsp;<span class="powerShell__operator">-</span>Verbose&nbsp;<span class="powerShell__operator">-</span>Force</pre>
                            </div>
                        </div>
                    </div>
                </div>
                <em>&nbsp;</em>
            </span>
            <h1 style="margin:12pt 0in 0pt"><span style="color:#2e74b5; font-family:Calibri Light; font-size:large">Versions</span></h1>
            <p style="margin:0in 0in 8pt"><span style="font-family:Calibri; font-size:normal">1.0.0.0</span></p>
            <ul style="list-style-type:disc; direction:ltr">
                <li style="color:#000000; font-style:normal; font-weight:normal">
                    <p style="color:#000000; font-style:normal; font-weight:normal; margin-top:0in; margin-bottom:0pt">
                        <span style="font-size:normal">Initial release with the following resources</span>
                    </p>
                    <ul style="list-style-type:circle">
                        <li>
                            <span style="font-size:normal">xIPAddress </span>
                        </li>
                        <li>
                            <span style="font-size:normal">xDnsServerAddress</span>
                        </li>
                    </ul>
                </li>
            </ul>
            <p style="margin:0in 0in 8pt"><span style="font-family:Calibri; font-size:normal">2.0.0.0</span></p>
            <ul style="list-style-type:disc; direction:ltr">
                <li style="color:#000000; font-style:normal; font-weight:normal">
                    <p style="color:#000000; font-style:normal; font-weight:normal; margin-top:0in; margin-bottom:0pt">
                        <span style="font-size:normal">Adding the xFirewall resource</span>
                    </p>
                </li>
            </ul>
            <p style="margin:0in 0in 8pt"><span style="font-family:Calibri; font-size:normal">2.1.0</span></p>
            <ul>
                <li>
                    Added validity check that IPAddress and IPAddressFamily conforms with each other
                </li>
            </ul>
            <p style="margin:0in 0in 8pt"><span style="font-family:Calibri; font-size:normal">2.1.1</span></p>
            <ul style="list-style-type:disc; direction:ltr">
                <li style="color:#000000; font-style:normal; font-weight:normal">
                    <p style="color:#000000; font-style:normal; font-weight:normal; margin-top:0in; margin-bottom:0pt">
                        <span style="font-size:normal">Updated to fix issue with Get-DscConfiguration and xFirewall</span>
                    </p>
                    <p>&nbsp</p>
                    <p>&nbsp</p>
                </li>
            </ul>
        </div>


</body>
</html>